Repository navigation
fix: accept start.sh downloads signed by an expired release key - #7097
Open
SeriousCoding789 wants to merge 1 commit into
Open
SeriousCoding789 wants to merge 1 commit into
SeriousCoding789 wants to merge 1 commit into
Conversation
gpg judges key expiry at verification time and reports a signature made by a key that has expired since as EXPKEYSIG, so rejecting EXPKEYSIG made the jars of all earlier releases fail verification once the release key expires. checkSign accepts EXPKEYSIG as well as GOODSIG and rejects only a revoked release key. gpg reports a key that has been revoked and has also expired as EXPKEYSIG, so revocation is also read from the key listing.
Collaborator
|
[DISCUSS] With [NIT] An expired key is now accepted without any message. Keeping |
bladehan1
approved these changes
Nov 10, 2026
halibobo1205
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
For user experience,
start.shaccepts for now a release jar signed by the release key after the key has expired. It still rejects the jar when the release key has been revoked, including a revoked key that has also expired.start.sh:checkSignaccepts the release key's signature when gpg reports it asGOODSIGorEXPKEYSIG, and reads revocation from the key listing as well as fromREVKEYSIG.shell.md: a signature made by a revoked release key fails verification; an expired release key is no longer mentioned.Why are these changes required?
Since #7090,
checkSignrejects a signature that gpg reports asEXPKEYSIG. gpg judges key expiry at verification time, not at signing time, so a signature made while the key was valid is reported asEXPKEYSIGonce the key has expired. If the release signing subkey expires before its expiry is extended, the jars of all earlier releases fail verification, and--download,--upgrade,--releaseand the archive tool download no longer install them.Accepting
EXPKEYSIGis not enough on its own: gpg reports a signature made by a key that has been revoked and has also expired asEXPKEYSIG, notREVKEYSIG. SocheckSignalso reads revocation fromgpg --with-colons --list-keys, from the records of the primary key and the release subkey, and rejects the jar if either has been revoked.This PR has been tested by:
checkSigntaken unchanged fromstart.shbefore and after this change, run with real gpg 2.5.20 under macOS bash 3.2. The key server and the downloads are replaced by local fixtures, and the fixture keys are structured like the release key (a certify-only primary key with a signing subkey). Signatures made before and after the expiry of a key are created with gpg's clock set back (--faked-system-time).bash -n start.sh;shellcheckreports nothing new.Follow up
The release signing subkey
F859BCB44A28290Bexpires on 2027-01-03. gpg does not sign with an expired key, so the subkey's expiry has to be extended, and published to keys.openpgp.org and keyserver.ubuntu.com, before a release is signed after that date. A new signing subkey would instead requireRELEASE_KEY_FINGERPRINTinstart.shto be updated.Extra details
start.shfrom accepting its signatures. Revoking needs the primary key or its revocation certificate.